import React, { memo, FC, ReactNode } from 'react'
import { HeaderV2Wrapper } from './style'

interface IProps {
  children?: ReactNode
  title?: string
  moreText?: string
  moreLink?: string
}

const SectionHeaderV2: FC<IProps> = (props) => {
  const { title, moreText, moreLink } = props
  return (
    <HeaderV2Wrapper>
      <h2>{title}</h2>
      <a href={moreLink}>{moreText}</a>
    </HeaderV2Wrapper>
  )
}

export default memo(SectionHeaderV2)
